//
//  SPCommon.h
//  panzer
//
//  Created by 还带大道 on 2018/10/19.
//  Copyright © 2018年 还带大道. All rights reserved.
//

#ifndef SPCommon_h
#define SPCommon_h

#import "UIView+Extension.h"


/**
 自定义打印
 */
#ifdef DEBUG
#define RZLog(...) NSLog(@"%s 第%d行 \n %@\n\n",__func__,__LINE__,[NSString stringWithFormat:__VA_ARGS__])
#else
#define RZLog(...)
#endif

typedef NS_ENUM(NSInteger,OrderType) {
    OrderType_DFH,//待发货
//    OrderType_HH,//待发货
//    OrderType_TH,//待发货
    OrderType_SH//售后
};

typedef NS_ENUM(NSInteger,LiveType) {
    LiveType_JJKB,//即将开播
    LiveType_ZZZB//正在直播
};


typedef NS_ENUM(NSInteger,GenderType) {
    GenderType_MAN,//男
    GenderType_WOMAN,//女
    GenderType_ALL//全部
};



/**设置颜色*/
#define RZ_COLOR(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define RZ_COLOR_ALPHA(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
/**分割线颜色*/
#define RZSEPARATOR_LINE_COLOR [UIColor colorWithRed:(230)/255.0 green:(230)/255.0 blue:(230)/255.0 alpha:1.0]




/**屏幕尺寸*/
#define RZ_SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
#define RZ_SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height

//一些常用对象
#define RZ_WEAKOBJ(obj) __weak typeof(obj) weak##obj = obj
#define RZ_NOTIFICATIONCENTER [NSNotificationCenter defaultCenter]
#define RZ_USERDEFAULTES       [NSUserDefaults standardUserDefaults]
#define RZ_APPDELEGATE ((AppDelegate*)([[UIApplication sharedApplication] delegate]))


//系统版本
#define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]


//当前的活动窗口
#define RZ_KEYWINDOW [UIApplication sharedApplication].keyWindow

//iphone X适配
#define kStatusBarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
#define kNavBarHeight 44.0
#define kTabBarHeight (kStatusBarHeight>20?83:49)
#define kTopHeight (kStatusBarHeight + kNavBarHeight)





#endif /* SPCommon_h */
